home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
dbms_mag
/
9101
/
desq4.jan
< prev
next >
Wrap
Text File
|
1990-11-09
|
1KB
|
48 lines
Listing 4
* The index server inititalizes mail as follows:
* Define constant for status code that means end
TERMINATE = 99
PROCEED = 10
ABORT = 88
*Obtain the handle for the mailbox:
MalNTX = MAL_Me()
* Name the mailbox:
MAL_Name(MalNTX, "Index Server")
* Check Mail Queue:
DO WHILE StatCode <> TERMINATE
* Are there messages on the queue?
IF MAL_SizeOf(MalNTX) > 0
* Obtain message
Message = MAL_Readc(MalNTX)
* Obtain status code of last MAL_Readc()
StatCode = MAL_Status(MalNTX)
* Branch for each status code:
DO CASE
CASE StatCode = PROCEED
* Parse the incoming message
* Separate clauses between !
* Using FUNCky STRextract
* USE (clause1)
* INDEX ON &clause2 TO (clause3)
CASE StatCode = ABORT
* Use your imagination
ENDCASE
ENDIF
API_Pause()
ENDDO
Win_AtSay(WIN_Me(), 0,0, "Ending this task")
API_Exit()
RETURN